import requests


class IhrmLoginApi(object):
    def login(self, req_data):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                             json=req_data)

        return resp


if __name__ == '__main__':
    ihrm_login = IhrmLoginApi()

    req_data = {"mobile": "13800000002", "password": "123456"}
    res = ihrm_login.login(req_data)
    print("登录结果：",res.json())
